var avatarUp21 = '';

function iconTypeChange() {
    avatarUp21 = new $IconUpload("avatar21");
    avatarUp21.initIcon();
}

$(function () {
    iconTypeChange();
});

function firstClose() {
    parent.layer.close(parent.layer.getFrameIndex(window.name));
}

$("#avatar21PreId").on('click', '.cp_img_delete', function (e) {
    e.stopPropagation();
    var that = this;
    var id = $(that).parent().attr("id");
    $.ajax({
        url: Feng.ctxPath + "/doctorLooked/deleteOrthodonticsImgs",
        type: "post",
        data: {"id": id},
        success: function (data) {
            $(that).parent().parent().siblings().css({'pointer-events': 'auto', 'cursor': 'pointer', 'background': 'white'});
            $(that).parent().remove();
            Feng.success("删除成功！");
        },
        error: function (data) {
            alert("删除失败！");
        }
    });
});
